﻿//08.Write a program that, depending on the user's choice inputs int, double or string variable. If the
//variable is integer or double, increases it with 1. If the variable is string, appends "*" at its end. The
//program must show the value of that variable as a console output. Use switch statement.

using System;

namespace IntDoubleString
{
    class VarChoice
    {
        static void Main()
        {
            Console.Write("Please define what you want to enter: 1 for Integer; 2 for Double; 3 for String: ");
            var choice = int.Parse(Console.ReadLine());

            int Integer;
            double Double;
            string String;
            
            switch (choice)
            {
                case 1:
                        Console.Write("Please enter an int: ");
                        Integer = int.Parse(Console.ReadLine());
                        Console.WriteLine("The new value is: {0}.",Integer+1);
                        break;
                case 2:
                        Console.Write("Please enter a double: ");
                        Double = double.Parse(Console.ReadLine());
                        Console.WriteLine("The new value is: {0}.", Double + 1,0);
                        break;
                case 3:
                        Console.Write("Please enter a string: ");
                        String = Console.ReadLine();
                        Console.WriteLine("The new value is: {0}{1}.", String, "*");
                        break;
            }
        }
    }
}